ZahlGuide

Double-click on !Zahl to install its icon on the iconbar. Clicking on the iconbar-icon opens a task window:
Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio
Zahl = Big integers
>
You can enter commands at the > prompt but this is only useful for very simple calculations. It is more effective to write a script of commands in a text file and drag it onto the iconbar-icon. If there is output it will be displayed in a task window. Output is created by the print function, or by error messages.

SHIFT-dragging a text file to the iconbar icon will compile its contents to a data file of the same name but with /o appended to its name. Dragging the data file to the iconbar icon should produce the same output as dragging the original text file.

The purpose of !Zahl is to provide a tool for exploring large integers. Whereas standard Lua provides only one type number that conflates both floating point and whole numbers, !Zahl provides two numerical types, int32 and integer. The former are 32-bit integers, which take four bytes of storage and represent numbers from 2^31 - 1 down to -2^31. We refer to these as small numbers. The latter, by contrast, can use as many 32-bit words of memory as the computer has provision for; we refer to these as big numbers. Their storage is reclaimable by garbage collection when there are no more references to them. The standard operations of arithmetic can be used with either kind of number.

The imath library describes functions for creating, converting and manipulating big numbers. It is not necessary to know Lua to use them. However, a dialect of Lua is there under the bonnet, ready to be used. Lua has been used in the port to RISC OS of the Imath library because it provides both the garbage collector and the means of overloading the usual syntax of arithmetic.

Lua was developed at the Pontifical Catholic University of Rio de Janeiro. The Imath library was written by Michael J. Fromberger. Its Lua bindings were written by Luiz Henrique de Figueiredo.